From 260237240172b804da41b1f22d8b8006363c5150 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 6 Jan 2014 17:05:53 -0500 Subject: [PATCH] Be more careful when parsing gtk-decoration-layout When the string is empty, breaking it at : will not give us two tokens, and we were parsing garbage, leading to crash. https://bugzilla.gnome.org/show_bug.cgi?id=721635 --- gtk/gtkheaderbar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkheaderbar.c b/gtk/gtkheaderbar.c index f466cafb70..bbe6faad4c 100644 --- a/gtk/gtkheaderbar.c +++ b/gtk/gtkheaderbar.c @@ -359,7 +359,7 @@ _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar) int n_children = 0; if (tokens[i] == NULL) - continue; + break; t = g_strsplit (tokens[i], ",", -1); -- 2.30.2